package com.sky.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "user_reading_data")
public class UserReadingData implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    private String id;
    @Field("u_id")
    private Integer uId;
    @Field("total_books")
    private int totalBooks;
    @Field("reading_days")
    private int readingDays;
    @Field("total_hours")
    private int totalHours;
    @Field("current_streak")
    private int currentStreak;
    @Field("books_trend")
    private int booksTrend;
    @Field("time_trend")
    private int timeTrend;
    @Field("current_month")
    private String currentMonth;
    @Field("efficiency_score")
    private int efficiencyScore;
    @Field("concentration_score")
    private double concentrationScore;
    @Field("comprehension_score")
    private double comprehensionScore;
    @Field("speed_score")
    private int speedScore;
    @Field("genre_data")
    private List<GenreData> genreData;
    @Field("time_data")
    private List<TimeData> timeData;
    @Field("last_update")
    private Date lastUpdate;
}
@Data
class GenreData {
    private String name;
    private int value;
    private double percentage;
}
@Data
class TimeData {
    private String time;
    private int value;
    private double percentage;
}